import request from '../config/request'

export default {
  uploadAchieve(data) {
    return request.post({
      url: '/achieve/upload',
      data,
      ignoreToken: false,
      form: false
    })
  },
  getOwnAchieveList(data) {
    return request.post({
      url: "/achieve/selectOwn",
      data,
      ignoreToken: false,
      form: false
    })
  },
  getCategoryInfoByAchieve(achieveId){
    return request.get({
      url: '/achieve/getCategoryInfoByAchieve/' + achieveId,
      ignoreToken: false,
      form: false
    })

  },
  deleteAchieve(achieveId) {
    return request.del({
      url: /achieve/+achieveId,
      ignoreToken: false,
      form: false
    })
  },
  delay(milSec) {

    return new Promise(resolve => {

      setTimeout(resolve, milSec)

    })

  }
}
